﻿using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Navigation;
using RIA.NTiersApp.Views.PruductUI;
using RIA.ServicesLibrary.Web.Models;

namespace RIA.NTiersApp.Views
{
    public partial class PruductListPage : Page
    {
        public PruductListPage ()
        {
            InitializeComponent ();
        }

        // Executes when the user navigates to this page.
        protected override void OnNavigatedTo ( NavigationEventArgs e )
        {
        }

        private void btnAdd_Click ( object sender, RoutedEventArgs e )
        {
            ProductDetailsWindow window = new ProductDetailsWindow (  );
            window.Show ();
        }

        private void ListBoxDoubleClickBehavior_DoubleClick ( object sender, MouseButtonEventArgs e )
        {
            ListBox box = sender as ListBox;
            ProductDetailsWindow window = new ProductDetailsWindow ( box.SelectedItem as ProductSummary);
            window.Show ();
        }

       

       

    }
}
